home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / U-Z / VideoToolBox.cpt / VideoToolboxSources / CenterRectInRect.c < prev    next >
MacBinary  |  1993-02-20  |  1.5 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Feb 20 22:52:10 1993, modified Sat Feb 20 22:52:10 1993, creator Think C, type ASCII, 835 bytes "CenterRectInRect.c" , at 0x3c3 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 43 65 6e 74 65 72 | 52 65 63 74 49 6e 52 65 |..Center|RectInRe|
|00000010| 63 74 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |ct.c....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 03 43 00 | 00 01 ac a7 ac ac ea a7 |......C.|........|
|00000060| ac ac ea 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 82 3c 00 00 |........|.....<..|
|00000080| 2f 2a 0d 43 65 6e 74 65 | 72 52 65 63 74 49 6e 52 |/*.Cente|rRectInR|
|00000090| 65 63 74 2e 63 0d a9 31 | 39 39 31 2d 31 39 39 33 |ect.c..1|991-1993|
|000000a0| 20 44 65 6e 69 73 20 47 | 2e 20 50 65 6c 6c 69 0d | Denis G|. Pelli.|
|000000b0| 54 68 65 73 65 20 72 6f | 75 74 69 6e 65 73 20 61 |These ro|utines a|
|000000c0| 72 65 20 74 72 69 76 69 | 61 6c 2c 20 62 75 74 20 |re trivi|al, but |
|000000d0| 65 6e 68 61 6e 63 65 20 | 74 68 65 20 72 65 61 64 |enhance |the read|
|000000e0| 61 62 69 6c 69 74 79 20 | 6f 66 20 70 72 6f 67 72 |ability |of progr|
|000000f0| 61 6d 73 20 74 68 61 74 | 20 75 73 65 20 74 68 65 |ams that| use the|
|00000100| 6d 2e 0d 0d 48 49 53 54 | 4f 52 59 3a 0d 38 2f 32 |m...HIST|ORY:.8/2|
|00000110| 34 2f 39 31 09 64 67 70 | 09 4d 61 64 65 20 63 6f |4/91.dgp|.Made co|
|00000120| 6d 70 61 74 69 62 6c 65 | 20 77 69 74 68 20 54 48 |mpatible| with TH|
|00000130| 49 4e 4b 20 43 20 35 2e | 30 2e 0d 31 2f 32 35 2f |INK C 5.|0..1/25/|
|00000140| 39 33 20 64 67 70 20 72 | 65 6d 6f 76 65 64 20 6f |93 dgp r|emoved o|
|00000150| 62 73 6f 6c 65 74 65 20 | 73 75 70 70 6f 72 74 20 |bsolete |support |
|00000160| 66 6f 72 20 54 48 49 4e | 4b 20 43 20 34 2e 0d 2a |for THIN|K C 4..*|
|00000170| 2f 0d 23 69 6e 63 6c 75 | 64 65 20 22 56 69 64 65 |/.#inclu|de "Vide|
|00000180| 6f 54 6f 6f 6c 62 6f 78 | 2e 68 22 0d 0d 76 6f 69 |oToolbox|.h"..voi|
|00000190| 64 20 43 65 6e 74 65 72 | 52 65 63 74 49 6e 52 65 |d Center|RectInRe|
|000001a0| 63 74 28 52 65 63 74 20 | 2a 61 2c 52 65 63 74 20 |ct(Rect |*a,Rect |
|000001b0| 2a 62 29 0d 7b 0d 09 4f | 66 66 73 65 74 52 65 63 |*b).{..O|ffsetRec|
|000001c0| 74 28 61 2c 28 62 2d 3e | 6c 65 66 74 20 2b 20 62 |t(a,(b->|left + b|
|000001d0| 2d 3e 72 69 67 68 74 20 | 2d 20 61 2d 3e 6c 65 66 |->right |- a->lef|
|000001e0| 74 20 2d 20 61 2d 3e 72 | 69 67 68 74 29 2f 32 0d |t - a->r|ight)/2.|
|000001f0| 09 09 2c 28 62 2d 3e 74 | 6f 70 20 2b 20 62 2d 3e |..,(b->t|op + b->|
|00000200| 62 6f 74 74 6f 6d 20 2d | 20 61 2d 3e 74 6f 70 20 |bottom -| a->top |
|00000210| 2d 20 61 2d 3e 62 6f 74 | 74 6f 6d 29 2f 32 29 3b |- a->bot|tom)/2);|
|00000220| 0d 7d 0d 0d 76 6f 69 64 | 20 4f 66 66 73 65 74 52 |.}..void| OffsetR|
|00000230| 65 63 74 54 69 6c 65 28 | 52 65 63 74 20 2a 72 2c |ectTile(|Rect *r,|
|00000240| 69 6e 74 20 6e 78 2c 69 | 6e 74 20 6e 79 29 20 2f |int nx,i|nt ny) /|
|00000250| 2a 20 73 68 69 66 74 20 | 72 65 63 74 20 62 79 20 |* shift |rect by |
|00000260| 6d 75 6c 74 69 70 6c 65 | 73 20 6f 66 20 74 68 65 |multiple|s of the|
|00000270| 20 72 65 63 74 20 2a 2f | 0d 2f 2f 20 53 68 69 66 | rect */|.// Shif|
|00000280| 74 20 72 65 63 74 20 62 | 79 20 6d 75 6c 74 69 70 |t rect b|y multip|
|00000290| 6c 65 73 20 6f 66 20 74 | 68 65 20 72 65 63 74 0d |les of t|he rect.|
|000002a0| 7b 0d 09 4f 66 66 73 65 | 74 52 65 63 74 28 72 2c |{..Offse|tRect(r,|
|000002b0| 6e 78 2a 28 72 2d 3e 72 | 69 67 68 74 2d 72 2d 3e |nx*(r->r|ight-r->|
|000002c0| 6c 65 66 74 29 2c 6e 79 | 2a 28 72 2d 3e 62 6f 74 |left),ny|*(r->bot|
|000002d0| 74 6f 6d 2d 72 2d 3e 74 | 6f 70 29 29 3b 0d 7d 0d |tom-r->t|op));.}.|
|000002e0| 0d 42 6f 6f 6c 65 61 6e | 20 52 65 63 74 49 6e 52 |.Boolean| RectInR|
|000002f0| 65 63 74 28 52 65 63 74 | 20 2a 72 2c 52 65 63 74 |ect(Rect| *r,Rect|
|00000300| 20 2a 52 29 0d 2f 2f 20 | 49 73 20 74 68 65 20 66 | *R).// |Is the f|
|00000310| 69 72 73 74 20 72 65 63 | 74 20 65 6e 74 69 72 65 |irst rec|t entire|
|00000320| 6c 79 20 69 6e 73 69 64 | 65 20 74 68 65 20 73 65 |ly insid|e the se|
|00000330| 63 6f 6e 64 3f 0d 2f 2f | 20 49 66 20 65 69 74 68 |cond?.//| If eith|
|00000340| 65 72 20 72 65 63 74 20 | 68 61 73 20 7a 65 72 6f |er rect |has zero|
|00000350| 20 61 72 65 61 20 74 68 | 65 6e 20 74 68 69 73 20 | area th|en this |
|00000360| 72 6f 75 74 69 6e 65 20 | 77 69 6c 6c 20 72 65 74 |routine |will ret|
|00000370| 75 72 6e 20 66 61 6c 73 | 65 2e 0d 7b 0d 09 52 65 |urn fals|e..{..Re|
|00000380| 63 74 20 74 3b 0d 09 0d | 09 69 66 28 21 53 65 63 |ct t;...|.if(!Sec|
|00000390| 74 52 65 63 74 28 72 2c | 52 2c 26 74 29 29 72 65 |tRect(r,|R,&t))re|
|000003a0| 74 75 72 6e 20 30 3b 0d | 09 72 65 74 75 72 6e 20 |turn 0;.|.return |
|000003b0| 45 71 75 61 6c 52 65 63 | 74 28 72 2c 26 74 29 3b |EqualRec|t(r,&t);|
|000003c0| 0d 7d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000410| 52 65 63 74 20 2a 52 29 | 0d 2f 2a 20 49 73 20 74 |Rect *R)|./* Is t|
|00000420| 68 65 20 66 69 72 73 74 | 20 72 65 63 74 20 65 6e |he first| rect en|
|00000430| 12 43 65 6e 74 65 72 52 | 65 63 74 49 6e 52 65 63 |.CenterR|ectInRec|
|00000440| 74 2e 63 52 02 00 00 00 | 54 45 58 54 4b 41 48 4c |t.cR....|TEXTKAHL|
|00000450| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 a7 e5 d5 ae 00 00 | 00 00 00 00 01 ac 74 69 |........|......ti|
|00000480| 6e 65 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 66 |ne will |return f|
|00000490| 61 6c 73 65 2e 20 2a 2f | 0d 7b 0d 09 52 65 63 74 |alse. */|.{..Rect|
|000004a0| 20 74 3b 0d 09 0d 09 69 | 66 28 21 53 65 63 74 52 | t;....i|f(!SectR|
|000004b0| 65 63 74 28 72 2c 52 2c | 26 74 29 29 72 65 74 75 |ect(r,R,|&t))retu|
|000004c0| 72 6e 20 30 3b 0d 09 72 | 65 74 75 72 6e 20 45 71 |rn 0;..r|eturn Eq|
|000004d0| 75 61 6c 52 65 63 74 28 | 72 2c 26 74 29 3b 0d 7d |ualRect(|r,&t);.}|
|000004e0| 0d 73 65 74 62 75 66 28 | 46 49 4c 45 20 2a 2c 20 |.setbuf(|FILE *, |
|000004f0| 63 68 61 72 20 2a 29 3b | 0d 69 6e 74 20 73 65 74 |char *);|.int set|
|00000500| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 50 00 20 |...H..Mo|naco.P. |
|00000510| 00 50 02 2e 01 ce 00 20 | 01 ce 02 2e 7f f5 80 0a |.P..... |........|
|00000520| 7f f5 7f f5 00 00 00 06 | 00 04 00 50 00 20 01 8d |........|...P. ..|
|00000530| 02 3d 00 50 00 20 01 8d | 02 3d a7 ac 74 aa 00 00 |.=.P. ..|.=..t...|
|00000540| 00 f2 00 00 00 f2 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00000550| 00 50 00 20 01 8d 02 3d | 00 50 00 20 01 8d 02 3d |.P. ...=|.P. ...=|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 21 |.....n..|.n...>.!|
|00000580| 0c dc 13 d6 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |........|.>..MPSR|
|00000590| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 03 f0 ff ff 00 00 00 4c | 00 23 0c ac 00 00 00 00 |.......L|.#......|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+